php forum
php mysql forum
php mysql smarty
 
Topic Options
#315692 - 09/15/07 06:44 PM [7.2.2] [7.3] Rename topic
blaaskaak Offline
Enthusiast

Registered: 02/25/07
Posts: 329
Loc: The Netherlands
When you merge 2 threads together you end up with a thread that has more then 1 topictitle. Confusing, because the last-reply subject put on the main forum index.

Also when you move a post with it's reply's to a new topic, you often want to rename the topic. And sometimes, well, you want want to rename a topic. Get a spell error out, and get that spell error also out of the subjects in the reply.

This hack adds a menu option to the "manage topic" menu for mods and admins that renames an entire thread according to the subject of post #1 in that topic.

Enjoy! Or not smile Whatever makes you happy smile


Attachments
renamethreads.zip (14 downloads)
renametopic73.zip (1 downloads)
Description: Update for 7.3




Edited by blaaskaak (05/18/08 08:43 PM)
Edit Reason: 7.3 update
_________________________

Top
#315693 - 09/15/07 08:57 PM Re: [7.2.2] Rename topic [Re: blaaskaak]
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
Looks great, thanks blaaskaak!
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#315695 - 09/15/07 10:09 PM Re: [7.2.2] Rename topic [Re: blaaskaak]
Myke Offline
Power User

Registered: 09/06/99
Posts: 97
Loc: Sydney, Australia
I had trouble with the attached zip. Anyone else?

And although I've yet to try it out, I'd love to see something like this integrated into the main product! smile

Top
#315696 - 09/15/07 10:34 PM Re: [7.2.2] Rename topic [Re: Myke]
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
Just tested the zip; fails in both winrar and the built in zip option in WXP
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#315700 - 09/16/07 03:18 AM Re: [7.2.2] Rename topic [Re: Gizmo]
blaaskaak Offline
Enthusiast

Registered: 02/25/07
Posts: 329
Loc: The Netherlands
Just reuploaded it. It was compressed with winzip, used the WinXP build in zip now.
_________________________

Top
#315702 - 09/16/07 05:18 AM Re: [7.2.2] Rename topic [Re: blaaskaak]
Myke Offline
Power User

Registered: 09/06/99
Posts: 97
Loc: Sydney, Australia
Thanks blaaskaak, the zip file is fine now and I've successfully integrated your mod! Me likes! smile

I have a couple of considerations for future revisions:

1. It would be nice to be given an opportunity, via js popup or form, to enter a "new" name for the topic. This saves you from having to manually edit the first post, which lazy admins like me would really appreciate! wink

2. When moving/merging threads, have the option of renaming as well. This would be really useful for when you're moving sub-threads that have gone off topic.

Top
#315727 - 09/17/07 11:18 AM Re: [7.2.2] Rename topic [Re: Myke]
blaaskaak Offline
Enthusiast

Registered: 02/25/07
Posts: 329
Loc: The Netherlands
I am also lazy, so I like to leave stuff that's already in ubb to ubb.

Not having my own box to edit a topictitle saves me the code to make sure the current subject is correct smile

Originally Posted By: Myke
1. It would be nice to be given an opportunity, via js popup or form, to enter a "new" name for the topic. This saves you from having to manually edit the first post, which lazy admins like me would really appreciate! wink


Alternative (less work and safer to code) would be to have a checkbox when you edit the first post of a topic with "Rename the rest also".

Heck, for our board a checkbox would not even be needed. We can force it always.
_________________________

Top
#315728 - 09/17/07 11:35 AM Re: [7.2.2] Rename topic [Re: blaaskaak]
blaaskaak Offline
Enthusiast

Registered: 02/25/07
Posts: 329
Loc: The Netherlands
Originally Posted By: blaaskaak
Heck, for our board a checkbox would not even be needed. We can force it always.


For those interested,

if you modify
/scripts/modifypost.inc.php
by finding
Code:
	if ($post_is_topic == true) {

and adding this below
Code:
		// Rename entire topic if first post is editted.
		$newSubject="Re: ".$Subject;
	
		$query = "
			UPDATE {$config['TABLE_PREFIX']}POSTS 
			SET POST_SUBJECT = ?
			WHERE TOPIC_ID = ?
			AND POST_IS_TOPIC = 0
		";
		$dbh -> do_placeholder_query($query,array($newSubject,$topic_id),__LINE__,__FILE__);


You rename an entire topic simply by editing the first post. This also works if a user renames the subject.
_________________________

Top
#315732 - 09/17/07 05:33 PM Re: [7.2.2] Rename topic [Re: blaaskaak]
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
Ohhhh, I like that latest addition... Edit the first post and all carries over... definately handy as I've had to rename quite the many topics hehe
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#315733 - 09/17/07 05:44 PM Re: [7.2.2] Rename topic [Re: Gizmo]
blaaskaak Offline
Enthusiast

Registered: 02/25/07
Posts: 329
Loc: The Netherlands
Me too, I just put it on our liveboard smile

Nothing like installing a hack just before bedtime and seeing what you'll wake up to in the morning laugh

I've always disliked how threads handled subjects. We were used to classic, where topicstarter sets the topic, and that's it. It's so stupid to see topic subject X on the main forum page, and you can't find that same topic subject on the overview of that specific forum.

Topics have subjects, not individual posts smile
_________________________

Top
#316204 - 11/01/07 07:32 AM Re: [7.2.2] Rename topic [Re: blaaskaak]
luckie Offline
Newbie

Registered: 10/24/07
Posts: 11
Originally Posted By: blaaskaak
When you merge 2 threads together you end up with a thread that has more then 1 topictitle. Confusing, because the last-reply subject put on the main forum index.

Also when you move a post with it's reply's to a new topic, you often want to rename the topic. And sometimes, well, you want want to rename a topic. Get a spell error out, and get that spell error also out of the subjects in the reply.

This hack adds a menu option to the "manage topic" menu for mods and admins that renames an entire thread according to the subject of post #1 in that topic.

Enjoy! Or not smile Whatever makes you happy smile


Hi,
When I click on 'rename this topic', it says 'the selected action has been completed' grin That's all, no oppertunity to insert a new name for the topic..
Did I do something wrong? I followed the instructions step by step smirk

Top
#316206 - 11/01/07 07:53 AM Re: [7.2.2] Rename topic [Re: luckie]
Myke Offline
Power User

Registered: 09/06/99
Posts: 97
Loc: Sydney, Australia
You've done nothing wrong, this is how the mod works. smile Read the original post a little more carefully:

Quote:
This hack adds a menu option to the "manage topic" menu for mods and admins that renames an entire thread according to the subject of post #1 in that topic.

So whatever the subject of the first post is, all replies inherit that subject with a "Re: " prefixed.

Top
#316208 - 11/01/07 07:58 AM Re: [7.2.2] Rename topic [Re: Myke]
luckie Offline
Newbie

Registered: 10/24/07
Posts: 11
oops, sorry, overlooked that one smirk

Top
#316231 - 11/01/07 04:51 PM Re: [7.2.2] Rename topic [Re: luckie]
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
I so vote for this and reply & close topic to be included in the next stock release :x...
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#317007 - 05/18/08 08:45 PM Re: [7.2.2] [7.3] Rename topic [Re: Gizmo]
blaaskaak Offline
Enthusiast

Registered: 02/25/07
Posts: 329
Loc: The Netherlands
Originally Posted By: Gizmo
I so vote for this and reply & close topic to be included in the next stock release :x...


Since this didn't make it into stock 7.3, I attached an update to the first post.

If you had this hack implemented, please replace the /scripts/dorenamethreads.inc.php also.

The hack I posted in this topic to just rename the entire thread if you edit a the first post still works in 7.3.
_________________________

Top



Moderator:  sirdude 
Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks